package com.kgc.ebookmanagement2.controller;

import com.kgc.ebookmanagement2.pojo.Ebook_Category;
import com.kgc.ebookmanagement2.pojo.ResultEntity;
import com.kgc.ebookmanagement2.service.Ebook_CategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-19 14:38
 */
@RestController
public class CategoryController {

    @Resource
    Ebook_CategoryService categoryService;
    @RequestMapping("/getCategoryList")
    public ResultEntity<List<Ebook_Category>> getCategoryList(){
        List<Ebook_Category> categoryList=categoryService.getSelectAll();
        return ResultEntity.successWithoutData(categoryList);
    }
}
